<article class="markdown">
    <h1><!-- react-text: 205 -->快速上手<!-- /react-text --></h1>
    <section class="markdown"></section>
    <section class="markdown">
        <h2 id="第一个例子"><span><!-- react-text: 210 -->第一个例子<!-- /react-text --></span><a href="#第一个例子" class="anchor">#</a></h2>
        <p>
            <!-- react-text: 213 -->可以复制下面的代码运行一个最简单的权限管理的角色管理界面
            <!-- /react-text -->
        </p>
         <p>首先先介绍项目的目录结构：</p>
<!-- NOTE: This info is intentionally duplicated in the README.
Copy any changes made here over to the README too. -->
<figure class="highlight"><pre><code class="language-bash" data-lang="bash">HTML/
├── mock/                                   //存放本地调试用的模拟json数据
│   ├── roleManage
│       ├── getRoleinfoList.json
│       ├── getSecStaticData.json
│       ├── retMessage.json
├── script/                                 //存放JS文件
│   ├── roleManage
│       ├── roleManage.js
└── view/                                   //存放HTML文件
    ├── roleManage
        ├── roleManage.html
    </code></pre></figure>
<!-- NOTE: This info is intentionally duplicated in the README.
Copy any changes made here over to the README too. -->
        <h3>创建HTML文件</h3>
        <section class="code-box expand" id="src-components-Button-demo-primary">
        <section class="highlight-wrapper highlight-wrapper-expand">
           <div class="highlight">
            <pre><code class="lang-html">
&lt;div class=&quot;row&quot; id=&quot;Page_roleManage&quot;&gt;
    &lt;div class=&quot;col-md-12&quot;&gt;
        &lt;div class=&quot;box&quot;&gt;
            &lt;form id=&quot;JS_getRoleinfo&quot;&gt;
                &lt;div class=&quot;box-header with-border&quot;&gt;
                    &lt;h3 class=&quot;box-title&quot;&gt;按条件查询&lt;/h3&gt;
                    &lt;div class=&quot;box-tools pull-right&quot;&gt;
                        &lt;button type=&quot;button&quot; class=&quot;btn btn-box-tool input-sm&quot; data-widget=&quot;collapse&quot;&gt;&lt;i class=&quot;fa fa-minus&quot;&gt;&lt;/i&gt;
                        &lt;/button&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;box-body&quot;&gt;
                    &lt;div class=&quot;row&quot;&gt;
                        &lt;div class=&quot;col-md-4&quot;&gt;
                            &lt;div class=&quot;form-group&quot;&gt;
                                &lt;label&gt;角色编号&lt;/label&gt;
                                &lt;input type=&quot;text&quot; class=&quot;form-control input-sm&quot; name=&quot;roleId&quot; placeholder=&quot;请输入角色编号&quot;&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;col-md-4&quot;&gt;
                            &lt;div class=&quot;form-group&quot;&gt;
                                &lt;label&gt;角色名称&lt;/label&gt;
                                &lt;input type=&quot;text&quot; class=&quot;form-control input-sm&quot; name=&quot;roleName&quot; placeholder=&quot;请输入角色名称&quot;&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;col-md-4&quot;&gt;
                            &lt;div class=&quot;form-group&quot;&gt;
                                &lt;label&gt;角色类型&lt;/label&gt;
                                &lt;select name=&quot;roleType&quot; class=&quot;form-control input-sm combo&quot; data-url=&quot;getSecStaticData&quot; data-idkey=&quot;codeId&quot; data-namekey=&quot;codeName&quot; data-cmd=&quot;codeType=10000003&quot;&gt;
                                    &lt;option value=&quot;&quot;&gt;请选择&lt;/option&gt;
                                &lt;/select&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;box-footer&quot;&gt;
                    &lt;div class=&quot;text-center&quot;&gt;
                        &lt;button type=&quot;reset&quot; class=&quot;btn btn-default&quot;&gt;重置&lt;/button&gt;
                        &lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; data-toggle=&quot;modal&quot; name=&quot;query&quot;&gt;查询&lt;/button&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/form&gt;
        &lt;/div&gt;
        &lt;div class=&quot;box&quot; id=&quot;JS_getRoleinfoList&quot; style=&quot;min-height:100px;&quot;&gt;
            &lt;div class=&quot;box-header &quot;&gt;
                &lt;h3 class=&quot;box-title&quot;&gt;角色列表&lt;/h3&gt;
                &lt;div class=&quot;box-tools&quot;&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; name=&quot;add&quot; data-toggle=&quot;modal&quot;&gt;新增 &lt;/button&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; name=&quot;update&quot; data-toggle=&quot;modal&quot;&gt;修改 &lt;/button&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; name=&quot;del&quot;&gt;删除 &lt;/button&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;box-body&quot; style=&quot;min-height: 100px;&quot;&gt;
                &lt;table class=&quot;table table-bordered table-hover&quot; data-adjustable=&quot;true&quot;&gt;
                    &lt;thead&gt;
                        &lt;tr&gt;
                            &lt;th class=&quot;iCheckbox&quot; width=&quot;25&quot;&gt;&lt;/th&gt;
                            &lt;th&gt;角色编号&lt;/th&gt;
                            &lt;th&gt;角色名称&lt;/th&gt;
                            &lt;th&gt;备注&lt;/th&gt;
                            &lt;th&gt;状态&lt;/th&gt;
                            &lt;th&gt;创建日期&lt;/th&gt;
                            &lt;th&gt;修改日期&lt;/th&gt;
                        &lt;/tr&gt;
                    &lt;/thead&gt;
                    &lt;tbody name=&quot;content&quot;&gt;&lt;/tbody&gt;
                &lt;/table&gt;
            &lt;/div&gt;
            &lt;div class=&quot;box-footer no-border&quot;&gt;
                &lt;div class=&quot;dataTables_paginate&quot; name=&quot;pagination&quot;&gt;&lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;!-- Modal --&gt;
&lt;div class=&quot;modal fade&quot; id=&quot;Modal_addRoleinfoModal&quot; tabindex=&quot;-1&quot; role=&quot;dialog&quot;&gt;
    &lt;div class=&quot;modal-dialog modal-lg&quot; role=&quot;document&quot;&gt;
        &lt;div class=&quot;modal-content&quot;&gt;
            &lt;div class=&quot;modal-header&quot;&gt;
                &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot; aria-label=&quot;Close&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;×&lt;/span&gt;&lt;/button&gt;
                &lt;h4 name=&quot;head&quot; class=&quot;box-title&quot;&gt;新增角色&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class=&quot;modal-body&quot;&gt;
                &lt;form id=&quot;JS_addRoleinfoForm&quot;&gt;&lt;/form&gt;
            &lt;/div&gt;
            &lt;div class=&quot;modal-footer&quot;&gt;
                &lt;div class=&quot;text-center&quot;&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; data-dismiss=&quot;modal&quot;&gt;取消&lt;/button&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; name=&quot;save&quot;&gt;保存&lt;/button&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;modal fade&quot; id=&quot;Modal_updateRoleinfoModal&quot; tabindex=&quot;-1&quot; role=&quot;dialog&quot;&gt;
    &lt;div class=&quot;modal-dialog modal-lg&quot; role=&quot;document&quot;&gt;
        &lt;div class=&quot;modal-content&quot;&gt;
            &lt;div class=&quot;modal-header&quot;&gt;
                &lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot; aria-label=&quot;Close&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;×&lt;/span&gt;&lt;/button&gt;
                &lt;h4 name=&quot;head&quot; class=&quot;box-title&quot;&gt;修改角色&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class=&quot;modal-body&quot;&gt;
                &lt;form id=&quot;JS_updateRoleinfoForm&quot;&gt;&lt;/form&gt;
            &lt;/div&gt;
            &lt;div class=&quot;modal-footer&quot;&gt;
                &lt;div class=&quot;text-center&quot;&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; data-dismiss=&quot;modal&quot;&gt;取消&lt;/button&gt;
                    &lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot; name=&quot;save&quot;&gt;保存&lt;/button&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;script id=&quot;TPL_addRoleinfoForm&quot; type=&quot;text/x-handlebars-template&quot;&gt;
    &lt;div class=&quot;row&quot;&gt;
        &lt;input type=&quot;hidden&quot; class=&quot;form-control input-sm&quot; name=&quot;roleId&quot; id=&quot;JS_nam&quot; placeholder=&quot;请输入角色名称&quot; value=&quot;{{roleId}}&quot;&gt;
        &lt;div class=&quot;col-md-4&quot;&gt;
            &lt;div class=&quot;form-group&quot;&gt;
                &lt;label&gt;角色名称&lt;/label&gt;
                &lt;input type=&quot;text&quot; class=&quot;form-control input-sm&quot; name=&quot;roleName&quot; id=&quot;JS_nam&quot; placeholder=&quot;请输入角色名称&quot; value=&quot;{{roleName}}&quot;&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-md-4&quot;&gt;
            &lt;div class=&quot;form-group&quot;&gt;
                &lt;label&gt;角色类型&lt;/label&gt;
                &lt;select name=&quot;roleType&quot; class=&quot;form-control input-sm combo&quot; data-url=&quot;getSecStaticData&quot; data-idkey=&quot;codeId&quot; data-namekey=&quot;codeName&quot; data-cmd=&quot;codeType=10000003&quot;&gt;
                    &lt;option value=&quot;&quot;&gt;请选择&lt;/option&gt;
                &lt;/select&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-md-4&quot;&gt;
            &lt;div class=&quot;form-group&quot;&gt;
                &lt;label&gt;备注&lt;/label&gt;
                &lt;input type=&quot;text&quot; class=&quot;form-control input-sm&quot; name=&quot;notes&quot; id=&quot;JS_not&quot; placeholder=&quot;请输入备注&quot; value=&quot;{{notes}}&quot;&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/script&gt;
&lt;script id=&quot;TPL_getRoleinfoList&quot; type=&quot;text/x-handlebars-template&quot;&gt;
    {{#each this}}
    &lt;tr&gt;
        &lt;td&gt;
            &lt;input type=&quot;radio&quot; class=&quot;minimal&quot; name=&quot;roleId&quot; value=&quot;{{roleId}}&quot;&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;roleType&quot; value=&quot;{{roleType}}&quot;&gt;
        &lt;/td&gt;
        &lt;td&gt;{{roleId}}
            &lt;input type=&quot;hidden&quot; name=&quot;roleId&quot; value=&quot;{{roleId}}&quot;&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;roleName&quot; value=&quot;{{roleName}}&quot;&gt;{{roleName}}&lt;/td&gt;
        &lt;td&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;notes&quot; value=&quot;{{notes}}&quot;&gt;{{notes}}&lt;/td&gt;
        &lt;td&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;state&quot; value=&quot;{{state}}&quot;&gt;{{transRoleState state}}&lt;/td&gt;
        &lt;td&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;createDate&quot; value=&quot;{{createDate}}&quot;&gt;{{createDate}}&lt;/td&gt;
        &lt;td&gt;
            &lt;input type=&quot;hidden&quot; name=&quot;doneDate&quot; value=&quot;{{doneDate}}&quot;&gt;{{doneDate}}&lt;/td&gt;
    &lt;/tr&gt;
    {{/each}}
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
seajs.use(&quot;script/systemManage/roleManage&quot;, function(Init) {
    Init.init();
});
&lt;/script&gt;
         </code></pre>
     </div>
 </section>
</section>
        <h3>创建JavaScript文件</h3>
        <section class="code-box expand" id="src-components-Button-demo-primary">
        <section class="highlight-wrapper highlight-wrapper-expand">
           <div class="highlight">
            <pre><code class="lang-javascript">
define(function(require,exports,module){
    // 通用工具模块
    var Utils = require("global/utils.js");
    // 路径重命名
    var pathAlias = "systemManage/roleManage/";
     var Page = Utils.initPage('roleManage');

    // 角色管理接口查询
    srvMap.add("getRoleinfoList", pathAlias + "getRoleinfoList.json", "public/@uspa_roleAction/refreshRoleByOper");
    //角色类型下拉拉框接口
    srvMap.add("getSecStaticData", pathAlias + "getSecStaticData.json", "public/@uspa_commonAction/getSecStaticData");
    // 新增角色
    srvMap.add("addRoleinfo", pathAlias + "retMessage.json", "public/@uspa_roleAction/saveRole");
    // 修改角色
    srvMap.add("updateRoleinfo", pathAlias + "retMessage.json", "public/@uspa_roleAction/updateRole");
    // 删除角色
    srvMap.add("delRoleinfo", pathAlias + "retMessage.json", "public/@uspa_roleAction/delRole");

    var Data = {
        roleId: null,
        queryListCmd: null,
        setPageType:function(type){
            return {
                "data":{
                    "type":type
                }
            }
        }
    }

    var Query = {
        init: function(){
            this._render();
        },
        _render: function() {
            this.getRoleinfoList();
             // 初始化查询表单
            this.queryRoleinfoForm();
        },
        // 角色列表
        getRoleinfoList: function(cmd){
            var self = this;
            var _cmd = '' || cmd;
            XMS.msgbox.show('数据加载中，请稍候...', 'loading');
            var _dom = Page.findId('getRoleinfoList');
            var _update = _dom.find("[name='update']");
            var _domPagination = _dom.find("[name='pagination']");
            Utils.getServerPage(srvMap.get('getRoleinfoList'), _cmd, function(json) {
                window.XMS.msgbox.hide();
                 var template = Handlebars.compile(Page.findTpl('getRoleinfoList'));
                _dom.find("[name='content']").html(template(json.data.rows));
                 self.addRoleinfo();
                 self.delRoleinfo();
                 self.updateRoleinfo();
                 Utils.eventTrClickCallback(_dom, function() {
                    _update.click();
                 });
            },_domPagination);  
        },
        queryRoleinfoForm: function() {
            var self = this;
            var _form = Page.findId('getRoleinfo');
            Utils.setSelectData(_form);
            var _queryBtn = _form.find("[name='query']");
            _queryBtn.bind('click', function() {
                var cmd = _form.serialize();
                Data.queryListCmd = cmd;
                self.getRoleinfoList(cmd);
            });

        },
        // 添加角色
        addRoleinfo: function(){
            var self = this;
            var _dom = Page.findId('getRoleinfoList');
            var _modal = Page.findModal('addRoleinfoModal');
            var _form = Page.findId('addRoleinfoForm');
            var _add = _dom.find("[name='add']");
            _add.unbind('click');
            _add.bind('click', function() {
                var template = Handlebars.compile(Page.findTpl('addRoleinfoForm'));
                _form.html(template());
                Utils.setSelectData(_form);
                _modal.modal('show');
                self.saveRoleinfo();
            })
        },
        // 修改角色
        updateRoleinfo:function(_data){
            var self = this;
            var _dom = Page.findId('getRoleinfoList');
            var _update = _dom.find("[name='update']");
            _update.unbind('click');
            _update.bind('click', function() {
            var _data = Utils.getRadioCheckedRow(_dom);
            if (_data) {
                var _modal = Page.findModal('updateRoleinfoModal');
                var _form = Page.findId('updateRoleinfoForm');
                var template = Handlebars.compile(Page.findTpl('addRoleinfoForm'));
                _form.html(template());
                Utils.setSelectData(_form, '', function() {
                    _form.find("[name='roleType']").val(_data.roleType);
                });
                _form.find("[name='roleId']").val(_data.roleId);
                _form.find("[name='roleName']").val(_data.roleName);  
                _form.find("[name='notes']").val(_data.notes);
                _form.find("[name='state']").val(_data.state);
                _form.find("[name='createDate']").val(_data.createDate);
                _form.find("[name='doneDate']").val(_data.doneDate);
                _modal.modal('show');
                self.saveuRoleinfo(_data);
                 }
            });
        },
        // 删除角色
        delRoleinfo: function(){
            var self = this;
            var _dom = Page.findId('getRoleinfoList');
            var _del = _dom.find("[name='del']");
            _del.unbind('click');
            _del.bind('click', function() {
            var _data = Utils.getRadioCheckedRow(_dom);
                if(_data){
                 Utils.confirmModal(function() {
                        XMS.msgbox.show('数据加载中，请稍候...', 'loading');
                        var _cmd = {
                                delRoleId:_data.roleId
                        };
                        Rose.ajax.postJson(srvMap.get('delRoleinfo'), _cmd, function(json, status) {
                            if (status) {
                                window.XMS.msgbox.hide();
                                XMS.msgbox.show('删除成功！', 'success', 2000)
                                setTimeout(function() {
                                    self.getRoleinfoList(Data.queryListCmd);
                                }, 1000)
                              
                            } else {
                                window.XMS.msgbox.show(json.retMessage, 'error', 2000)
                            }
                        });
                    })
                }
            });
        },
        //保存用户
        saveRoleinfo:function(){
            var self = this;
            var _modal = Page.findModal('addRoleinfoModal');
            var _form = Page.findId('addRoleinfoForm');
            //var _form = $(Dom.addRoleinfoForm);
            var _save = _modal.find("[name='save']");
            _save.unbind('click');
            _save.bind('click', function() {
            XMS.msgbox.show('数据加载中，请稍候...', 'loading');
            var _roleId= _form.find("[name='roleId']");
            var _roleName=_form.find("[name='roleName']");
            var _roleType=_form.find("[name='roleType']");
            var _notes=_form.find("[name='notes']");
            var _cmd ={
               paramMap:{
                roleId:_roleId.val(),
                roleName:_roleName.val(),
                roleType:_roleType.val(),
                notes:_notes.val(),
               }
            };
             Rose.ajax.postJson(srvMap.get('addRoleinfo'), _cmd, function(json, status) {
                        if (status) {
                            window.XMS.msgbox.hide();
                            var msg = "新增成功！";
                            window.XMS.msgbox.show(msg, 'success', 2000)
                            _modal.modal('hide');
                            setTimeout(function() {
                                self.getRoleinfoList(Data.queryListCmd);
                            }, 1000)

                        }
                    })                

            })
        },
        //修改保存用户
        saveuRoleinfo:function(_data){
            var self = this;
            var _modal = Page.findModal('updateRoleinfoModal');
            var _save = _modal.find("[name='save']");
            var _form = Page.findId('updateRoleinfoForm');
            _save.unbind('click');
            _save.bind('click', function() {
            XMS.msgbox.show('数据加载中，请稍候...', 'loading');
            var _roleId= _form.find("[name='roleId']");
            var _roleName=_form.find("[name='roleName']");
            var _roleType=_form.find("[name='roleType']");
            var _notes=_form.find("[name='notes']");
            var _cmd ={
               paramMap:{
                roleId:_roleId.val(),
                roleName:_roleName.val(),
                roleType:_roleType.val(),
                notes:_notes.val(),
               }
            };
           Rose.ajax.postJson(srvMap.get('updateRoleinfo'), _cmd, function(json, status) {
                         if (status) {
                            window.XMS.msgbox.hide();
                            var msg = "修改成功！";
                            window.XMS.msgbox.show(msg, 'success', 2000)
                            _modal.modal('hide');
                            setTimeout(function() {
                                self.getRoleinfoList();
                           }, 1000)

                        }
                    })

        })
        },
        
    };
    module.exports = Query;
});


         </code></pre>
     </div>
 </section>
</section>
        <h3>
            创建Json文件

        </h3>
        <p>创建getRoleinfoList.json</p>
        <section class="code-box expand" id="src-components-Button-demo-primary">
        <section class="highlight-wrapper highlight-wrapper-expand">
           <div class="highlight">
            <pre><code class="lang-json">
{
    "data":
    {
        "total": 15,
        "rows": [
        {
            "doneCode": "6676",
            "notes": "",
            "validDate": "",
            "roleId": "1606",
            "opId": "2000001",
            "roleType": "11",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "测试ie8",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6623",
            "notes": "222",
            "validDate": "",
            "roleId": "1601",
            "opId": "2000001",
            "roleType": "1",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "测试22",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6626",
            "notes": "",
            "validDate": "",
            "roleId": "1604",
            "opId": "2000001",
            "roleType": "2",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "测试33",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6635",
            "notes": "333",
            "validDate": "",
            "roleId": "1605",
            "opId": "2000001",
            "roleType": "2",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "测试新角色",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6722",
            "notes": "",
            "validDate": "",
            "roleId": "1608",
            "opId": "2602",
            "roleType": "1",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "角色测试",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6723",
            "notes": "",
            "validDate": "",
            "roleId": "1609",
            "opId": "2602",
            "roleType": "2",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "测试444",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6727",
            "notes": "",
            "validDate": "",
            "roleId": "1610",
            "opId": "2602",
            "roleType": "1",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "菜单控制",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6513",
            "notes": "4546",
            "validDate": "",
            "roleId": "1419",
            "opId": "2000001",
            "roleType": "1",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "暗夜猎手",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6514",
            "notes": "21212",
            "validDate": "",
            "roleId": "1420",
            "opId": "2000001",
            "roleType": "1",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "12",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        },
        {
            "doneCode": "6515",
            "notes": "79966",
            "validDate": "",
            "roleId": "1421",
            "opId": "2000001",
            "roleType": "1",
            "orgId": "",
            "domainId": "0",
            "regionCode": "",
            "roleName": "5464",
            "expireDate": "",
            "state": "1",
            "doneDate": "",
            "createDate": ""
        }]
    },
    "retMessage": "success",
    "retCode": 2000
}
         </code></pre>
     </div>
 </section>
</section>
        <p>创建getSecStaticData.json</p>
        <section class="code-box expand" id="src-components-Button-demo-primary">
        <section class="highlight-wrapper highlight-wrapper-expand">
           <div class="highlight">
            <pre><code class="lang-json">
{
    "data": [
    {
        "codeId": "1",
        "codeType": "10000003",
        "sortId": "1",
        "codeName": "业务",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "2",
        "codeType": "10000003",
        "sortId": "2",
        "codeName": "关税",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "3",
        "codeType": "10000003",
        "sortId": "3",
        "codeName": "资源",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "4",
        "codeType": "10000003",
        "sortId": "4",
        "codeName": "管理",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "5",
        "codeType": "10000003",
        "sortId": "5",
        "codeName": "客服特权",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "6",
        "codeType": "10000003",
        "sortId": "6",
        "codeName": "客服菜单",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "7",
        "codeType": "10000003",
        "sortId": "7",
        "codeName": "法人",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "8",
        "codeType": "10000003",
        "sortId": "8",
        "codeName": "参与者",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "9",
        "codeType": "10000003",
        "sortId": "9",
        "codeName": "客户",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "10",
        "codeType": "10000003",
        "sortId": "10",
        "codeName": "游客",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    },
    {
        "codeId": "11",
        "codeType": "10000003",
        "sortId": "11",
        "codeName": "系统",
        "codeNameNls": "Function Set Type",
        "isUsed": "1",
        "externCode": "0"
    }],
    "retMessage": "success",
    "retCode": 2000
}
         </code></pre>
     </div>
 </section>
</section>
        <p>创建retMessage.json</p>
        <section class="code-box expand" id="src-components-Button-demo-primary">
        <section class="highlight-wrapper highlight-wrapper-expand">
           <div class="highlight">
            <pre><code class="lang-json">
{
    "retCode": "2000",
    "retMessage": "系统异常，请稍后再试",
    "data": {
    }
}

         </code></pre>
     </div>
 </section>
</section>
        <p>复制以上代码可在本地完成角色管理的代码调试</p>
</article>